{% extends 'myadmin3/my_master.html' %}

{% block head %}
    {{ super() }}
    {{ dropzone.load_css() }}
    {{ dropzone.style('border: 2px dashed #0087F7; margin: 5px 0; min-height: 300px;') }}
    <style>
        .navbar {
            background-color: #6f7782;
        }

        footer.page-footer {
            background-color: #6f7782;
        }
    </style>
{% endblock head %}

{% block body %}
    {{ super() }}
    <div class="post_content">
        {{ dropzone.create(action='.test_upload') }}
        <button id="upload-btn" class="btn btn-primary" style="margin-left: 0;">{{ _("Upload") }}</button>
        <div class="col-md-12" style="height:45px;"></div>
    </div>
{% endblock body %}

{% block footer %}

    {{ dropzone.load_js() }}
    {{ dropzone.config(custom_init='dz = this;document.getElementById("upload-btn").addEventListener("click", function handler(e) {dz.processQueue();});',
                     custom_options='autoProcessQueue: false, addRemoveLinks: true,') }}

    <script>
        //$(document).ready(function() {
        // Register autofill on new selected image upload
        //    document.getElementById("upload_img").addEventListener("change", function(){
        //        var file = document.getElementById("upload_img").files[0].name;
        //        document.getElementById("upload_name").value = file
        //    });

        //} );
    </script>
{% endblock footer %}


